package org.zxp.datastructure.array;

import java.util.concurrent.CopyOnWriteArraySet;

/**
 * @program: effectiveJava
 * @description:
 * @author: X-Pacific zhang
 * @create: 2019-07-26 11:18
 **/
public class CopyOnWriteArraySetTest {
    public static void main(String[] args){
        CopyOnWriteArraySet<String> cowas = new CopyOnWriteArraySet<>();
        cowas.add("a");
        cowas.add("b");
        cowas.add("c");
        cowas.add("d");
        cowas.add("e");
        cowas.forEach(o -> System.out.println(o));
        System.out.println();
        cowas.add("c");
        cowas.add("d");
        cowas.add("e");
        cowas.forEach(o -> System.out.println(o));


    }
}
